MenuProvider

interface MenuProvider(source)

Interface for indicating that a component will be supplying MenuItems to the component owning the app bar.

Functions

Link copied to clipboard
abstract fun onCreateMenu(@NonNull menu: Menu, @NonNull menuInflater: MenuInflater)
Called by the MenuHost to allow the MenuProvider to inflate MenuItems into the menu.
Link copied to clipboard
open fun onMenuClosed(@NonNull menu: Menu)
Called by the MenuHost when the Menu is closed.
Link copied to clipboard
abstract fun onMenuItemSelected(@NonNull menuItem: MenuItem): Boolean
Called by the MenuHost when a MenuItem is selected from the menu.
Link copied to clipboard
open fun onPrepareMenu(@NonNull menu: Menu)
Called by the MenuHost right before the Menu is shown.